<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>后台管理系统-二级分类</title>
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="assets/bootstrap-validator/css/bootstrapValidator.min.css"/>
    <link rel="stylesheet" href="assets/nprogress/nprogress.css"/>
    <link rel="stylesheet" href="css/admin.css"/>
    <style>
        .fileupload{
            position: relative;
        }
        .fileupload [type="file"]{
            width: 82px;
            height: 34px;
            position: absolute;
            opacity: 0;
        }
    </style>
</head>
<body>
<!--侧边栏-->
<aside class="ad_aside">
    <!--商标-->
    <div class="brand"><a href="index.html">ITCAST</a></div>
    <!--用户-->
    <div class="user">
        <img src="images/default.png" alt=""/>
        <span>超级管理员</span>
    </div>
    <!--菜单-->
    <div class="menu">
        <ul>
            <li><a href="userManage.html"><span class="glyphicon glyphicon-user"></span> 用户管理</a></li>
            <li class="now">
                <a href="javascript:;"><span class="glyphicon glyphicon-list"></span> 分类管理</a>
                <div class="child">
                    <a href="categoryFirst.html">一级分类</a>
                    <a class="now" href="categorySecond.html">二级分类</a>
                </div>
            </li>
            <li><a href="productManage.html"><span class="glyphicon glyphicon-tags"></span> 商品管理</a></li>
        </ul>
    </div>
</aside>
<!--内容-->
<section class="ad_section">
    <!--顶部导航-->
    <nav class="ad_nav">
        <a data-menu href="javascript:;"><span class="glyphicon glyphicon-align-justify"></span></a>
        <a data-logout href="javascript:;"><span class="glyphicon glyphicon-log-out"></span></a>
    </nav>
    <div class="container-fluid">
        <!--路径导航-->
        <ol class="breadcrumb">
            <li><a href="#">管理系统</a></li>
            <li class="active">分类管理</li>
            <li class="active">二级分类</li>
        </ol>
        <div class="ad_content">
            <button id="addBtn" class="btn btn-default mb_15">添加分类</button>
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th width="10%">序号</th>
                    <th width="30%">一级分类名称</th>
                    <th width="30%">二级分类名称</th>
                    <th width="30%">二级分类LOGO</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <div class="page">
                <ul class="pagination"></ul>
            </div>
        </div>
    </div>
</section>
<div class="modal fade" id="addModal">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
                <h4 class="modal-title">添加分类</h4>
            </div>
            <div class="modal-body">
                <form action="#" id="form">
                    <div class="form-group">
                        <div class="dropdown">
                            <span>一级分类：</span>
                            <button class="btn btn-default" type="button" data-toggle="dropdown">
                                <span class="dropdown-text">请选择</span> <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu">
                                <li><a href="#">游泳馆</a></li>
                            </ul>
                        </div>
                        <input type="hidden" name="categoryId">
                    </div>
                    <div class="form-group">
                        <input name="brandName" type="text" class="form-control" placeholder="请输入二级分类名称">
                    </div>
                    <div class="form-group">
                        <input type="hidden" name="brandLogo">
                        <div class="fileupload">
                            <input type="file" name="pic1" data-url="/category/addSecondCategoryPic" class="btn btn-default">
                            <a href="javascript:;" class="btn btn-default">上传图片</a>
                        </div>
                    </div>
                    <div class="form-group"><img width="100" height="100" src="images/none.png" alt=""></div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-primary" form="form">确认</button>
        </div>
    </div>
</div>
<script type="text/template" id="template">
    <% for(var i = 0 ; i < rows.length ; i ++ ){ %>
    <tr>
        <td><%=(page-1)*size+i+1%></td>
        <td><%=rows[i].categoryName%></td>
        <td><%=rows[i].brandName%></td>
        <td><img width="50" height="50" src="<%=rows[i].brandLogo%>" alt=""></td>
    </tr>
    <% } %>
</script>定</button>
</div>
<script src="assets/jquery/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/bootstrap-validator/js/bootstrapValidator.min.js"></script>
<script src="assets/nprogress/nprogress.js"></script>
<script src="assets/artTemplate/template-native.js"></script>
<script src="assets/bootstrap-paginator/bootstrap-paginator.min.js"></script>
<script src="assets/jquery-fileupload/jquery.ui.widget.js"></script>
<script src="assets/jquery-fileupload/jquery.fileupload.js"></script>
<script src="js/admin.js"></script>
<script src="js/categorySecond.js"></script>
</body>
</html>